package com.edfu.core.coursemgt.persistence.api;

import java.util.List;

import com.edfu.core.coursemgt.persistence.entity.AcadSemCourseBranchRelnEntity;
import com.edfu.core.coursemgt.persistence.entity.CourseCourseOfferingRelnEntity;
import com.edfu.core.coursemgt.persistence.entity.CourseEntity;
import com.edfu.core.coursemgt.persistence.entity.CourseOfferingEntity;
import com.edfu.core.coursemgt.persistence.entity.CourseOfferingInstanceEntity;
import com.edfu.core.coursemgt.persistence.entity.ICourseMgtEntity;
import com.edfu.core.identitymgt.persistence.entity.UserEnrollmentEntity;
import com.edfu.core.institutemgt.persistence.entity.AcadSemBatchRelnEntity;
import com.edfu.core.institutemgt.persistence.entity.AcadSemBranchRelnEntity;
import com.edfu.core.institutemgt.persistence.entity.BatchEntity;

public interface ICourseMgtPersistence {


	CourseEntity getCourse(String courseCode);

	AcadSemBranchRelnEntity getAcadSemBranchReln(String branchCode, String semCode);

	List<AcadSemCourseBranchRelnEntity> getCoursesToBeTaughtInAnySem(String branchCode);

	List<AcadSemCourseBranchRelnEntity> getCoursesToBeTaughtInGivenSem(String branchCode, String semesterCode);

	List<UserEnrollmentEntity> getUserEnrollments(String userId, String userRole);

	AcadSemBatchRelnEntity getActiveSemesterForBatch(BatchEntity be);

	List<CourseCourseOfferingRelnEntity> getAssociatedCoursesForOffering(String courseOfferingCode);

	void persist(ICourseMgtEntity entity);
	
	CourseEntity merge(CourseEntity entity);
	
	void remove(ICourseMgtEntity entity);

	List<AcadSemCourseBranchRelnEntity> getCoursesInSemForBranch(String semesterCode, String branchCode);

	AcadSemCourseBranchRelnEntity getCourseIfTaughtInSem(String courseCode, String branchCode, String semesterCode);

	boolean teaches(String teacherUserId, String courseCode, String branchCode, String semesterCode);

	List<CourseOfferingEntity> getAllCourseOfferingsForBranchByMe(String userId, String branchCode);

	List<CourseOfferingInstanceEntity> getCourseOfferingInstancesCurrentlyTaughtByMe(String userId);

	List<CourseOfferingInstanceEntity> getCourseOfferingInstancesAuthoredByMe(String userId);

	List<CourseOfferingInstanceEntity> getCourseOfferingInstancesCurrentlyTaughtToMe(String userId);

	CourseEntity getCourse(long courseId);
	
	

}
